{block name="megadropdown"} {if $content_data.CATEGORIES_DATA|@count > 0} {block name="megadropdown_categories"}
{block name="megadropdown_categories_list"}

{if $content_data.CATEGORIES_DATA|@has_children} {block name="megadropdown_categories_list_children"} {foreach name=cat_data item=categories_item from=$content_data.CATEGORIES_DATA} {block name="megadropdown_categories_list_children_item"}
- {$categories_item.data.name|replace:"&":"&"|replace:"&":"&"}{if $categories_item.data.products_count} ({$categories_item.data.products_count}){/if} {if $categories_item.children|@count > 0} {block name="megadropdown_categories_list_children_sublist"}
  {foreach item=children_item from=$categories_item.children} {block name="megadropdown_categories_list_children_subitem"}
  - {$children_item.data.name|replace:"&":"&"|replace:"&":"&"}{if $children_item.data.products_count} ({$children_item.data.products_count}){/if}
  {/block} {/foreach}
  {/block} {/if}
{/block} {/foreach} {/block} {else} {block name="megadropdown_categories_list_no_children"}
- {foreach name=cat_data item=categories_item from=$content_data.CATEGORIES_DATA} {block name="megadropdown_categories_list_no_children_item"}
  - {$categories_item.data.name|replace:"&":"&"|replace:"&":"&"}{if $categories_item.data.products_count} ({$categories_item.data.products_count}){/if}
  {/block} {/foreach}
{/block} {/if}

{/block}
{/block} {/if} {block name="megadropdown_parents"} {$content_data.categories_parents_ids} {/block} {/block}